#include<stdio.h>

void main(){

int shu = 0,bai = 0,shi = 0,ge = 0;

for(shu=100;shu<1000;shu++)
{
   bai = shu/100;
   shi = shu/10%10;
   ge = shu%10;
   if(shu == ((bai*bai*bai)+(shi*shi*shi)+(ge*ge*ge)))
   {
	   printf("%d ",shu);
   }
}
printf("\n");
}